Make the bounds of drawing surfaces created by render nodes visible.
Trigger with GSK_DEBUG=surface.
{ "cairo", GSK_DEBUG_CAIRO },
{ "opengl", GSK_DEBUG_OPENGL },
{ "shaders", GSK_DEBUG_SHADERS },
- { "transforms", GSK_DEBUG_TRANSFORMS }
+ { "transforms", GSK_DEBUG_TRANSFORMS },
+ { "surface", GSK_DEBUG_SURFACE }
};
#endif
GSK_DEBUG_CAIRO = 1 << 2,
GSK_DEBUG_OPENGL = 1 << 3,
GSK_DEBUG_SHADERS = 1 << 4,
- GSK_DEBUG_TRANSFORMS = 1 << 5
+ GSK_DEBUG_TRANSFORMS = 1 << 5,
+ GSK_DEBUG_SURFACE = 1 << 6
} GskDebugFlags;
typedef enum {
node->bounds.size.width, node->bounds.size.height);
cairo_clip (res);
+ if (GSK_DEBUG_CHECK (SURFACE))
+ {
+ cairo_save (res);
+ cairo_rectangle (res,
+ node->bounds.origin.x + 1, node->bounds.origin.y + 1,
+ node->bounds.size.width - 2, node->bounds.size.height - 2);
+ cairo_set_source_rgba (res, 1, 0, 0, 0.5);
+ cairo_stroke (res);
+ cairo_restore (res);
+ }
+
return res;
}